<!DOCTYPE html>
<html lang="en">
<head>
    <title>Getting Started: Serving Web Content</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<script>
function submitForm() {
    var formData = new FormData();
    var l=document.getElementById("vendCertificate").files.length;
    for(var i=0;i<l;i++){
        formData.append("vendCertificate",document.getElementById("vendCertificate").files[i]); 
    }
    formData.append("VEND_ID",$.trim($("#VEND_ID").val()));
    $.ajax({
        url: "http://10.110.18.57:8349/file/batchupload",
        type: "POST",
        data: formData,
        contentType: false,
        processData: false,
        success: function () {
           $("#filemsg").text("文件上传成功")
        },
        error: function () {
        	$("#filemsg").text("上传失败，请重新选择文件！")
        }
    });
}

</script>
<p>Get your greeting <a href="/greeting">here</a></p>
<form action="/file/batchupload/" method="POST" enctype="multipart/form-data">
    文件：<input type="file" name="vendCertificate" multiple="multiple"/>
    <input type="text" name="VEND_ID" value="1010010A"/>
    <input type="submit" />
</form>
<a href="/file/download/1010010A">下载test</a>
</html>

